%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% AeoLiS model configuration                                       %%
%% Date: 2020-04-22 12:26:11                                        %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

visualization           = F
%% -------------------- [Timing] ----------------------------- %%
dt 						= 60      								% [s] Timeinterval between timesteps
tstart 					= 0										% [s] Starting time of the simulation
tstop 					= 3155760	    						% [s] End time of the simulation
restart                 = None               					% [s] Interval for which to write restart files
refdate               	= 2020-01-01 00:00 						% [-] Reference datetime in netCDF output

%% -------------------- [Grid files *.grd] ------------------- %%
xgrid_file 				= x_grid.txt							% Filename of ASCII file with x-coordinates of grid cells
ygrid_file 				= y_grid.txt							% Filename of ASCII file with y-coordinates of grid cells
bed_file 				= z_grid.txt							% Filename of ASCII file with bed level heights of grid cells
ne_file 				= None             						% Filename of ASCII file with non-erodible layer
veg_file 				= None  								% Filename of ASCII file with initial vegetation density
threshold_file          = None               					% Filename of ASCII file with shear velocity threshold
fence_file              = None               					% Filename of ASCII file with sand fence location/height (above the bed)
wave_mask               = None               					% Filename of ASCII file with mask for wave height
tide_mask               = None               					% Filename of ASCII file with mask for tidal elevation
threshold_mask          = None               					% Filename of ASCII file with mask for the shear velocity threshold

%% -------------------- [Time series *.txt] ------------------ %%
tide_file 				= None  								% Filename of ASCII file with time series of water levels
wave_file 				= None  								% Filename of ASCII file with time series of wave heights (and periods)
wind_file 				= wind_10yr_onshore.txt								% Filename of ASCII file with time series of wind velocity and direction
bedcomp_file 			= None                 					% Filename of ASCII file with initial bed composition
supply_file             = supply_file.txt                                  % Filename of ASCII file with a manual definition of sediment supply (mainly used in academic cases)
meteo_file              = None               					% Filename of ASCII file with time series of meteorlogical conditions

%% -------------------- [Output] ----------------------------- %%	
output_times 			= 3600  								% [s] Timeinterval [s] between *.nc output file
output_file 			= None   		    					% [-] Name of the *.nc output file
output_vars 			= uw u udir Cu Ct mass q qs qn          % [-] List of output variables for in *.nc output file

%% -------------------- [Flags Processes] -------------------- %%
process_wind           	= T               						% [T/F] Enable the process of wind 
process_shear        	= F               						% [T/F] Enable the process of wind shear
process_tide            = F               						% [T/F] Enable the process of tides
process_wave            = F               						% [T/F] Enable the process of waves
process_runup           = F               						% [T/F] Enable the process of wave runup
process_moist           = F               						% [T/F] Enable the process of moist
process_mixtoplayer     = F               						% [T/F] Enable the process of mixing
process_threshold       = T               						% [T/F] Enable the process of threshold
process_transport       = T               						% [T/F] Enable the process of transport
process_bedupdate       = F            							% [T/F] Enable the process of bed updating
process_meteo          	= F              						% [T/F] Enable the process of meteo
process_salt            = F              						% [T/F] Enable the process of salt
process_humidity        = F             						% [T/F] Enable the process of humidity
process_avalanche       = F               						% [T/F] Enable the process of avalanching
process_inertia         = F             						% [T/F] NEW (???)
process_separation      = F               						% [T/F] Enable the including of separation bubble
process_vegetation      = F              						% [T/F] Enable the process of vegetation
process_fences          = F              						% [T/F] Enable the process of sand fencing
process_dune_erosion    = F              						% [T/F] Enable the process of wave-driven dune erosion

%% -------------------- [Flags Threshold] -------------------- %%
th_grainsize            = T               						% [T/F] Enable wind velocity threshold based on grainsize
th_bedslope             = F              						% [T/F] Enable wind velocity threshold based on bedslope
th_moisture             = F               						% [T/F] Enable wind velocity threshold based on moisture
th_drylayer             = F              						% [T/F] Enable wind velocity threshold based on drying of layer
th_humidity             = F              						% [T/F] Enable wind velocity threshold based on humidity
th_salt                 = F              						% [T/F] Enable wind velocity threshold based on salt
th_roughness            = F               						% [T/F] Enable wind velocity threshold based on roughness
th_nelayer              = T              						% [T/F] Enable wind velocity threshold based on a non-erodible layer

%% -------------------- [General physics] -------------------- %%
g                       = 9.81               					% [m/s^2] Gravitational constant
v                       = 0.000015           					% [m^2/s] Air viscosity  
rhoa                    = 1.225              					% [kg/m^3] Air density
rhog                    = 2650.0              					% [kg/m^3] Grain density
rhow                    = 1025.0              					% [kg/m^3] Water density
porosity                = 0.4                 					% [-] Sediment porosity
cpair                  	= 0.0010035          					% [MJ/kg/oC] Specific heat capacity air

%% -------------------- [Sediment] --------------------------- %%
nlayers 				= 1										% [-] Number of bed layers
layer_thickness 		= 5								% [m] Thickness of bed layers
nfractions 				= 1										% [-] Number of sediment fractions
grain_dist 				= 1.0									% [-] Initial distribution of sediment fractions
grain_size 				= 0.0006 								% [m] Average grain size of each sediment fraction

%% -------------------- [Wind and shear] --------------------- %%
wind_convention         = nautical        						% [-] Convention used for the wind direction in the input files (cartesian or nautical)
alfa                    = 0                  					% [deg] Real-world grid cell orientation wrt the North (clockwise)
k 						= 0.01									% [m] Bed roughness
z                       = 1.                					% [m] Measurement height of wind velocity
kappa                   = 0.41               					% [-] Von Kármán constant
h                       = None               					% [m] Representative height of saltation layer
L                       = 100.               					% [m] Typical length scale of dune feature (perturbation)
l                       = 1.                					% [m] Inner layer height (perturbation)
m                       = 0.5                					% [-] Factor to account for difference between average and maximum shear stress
	
%% -------------------- [Transport] -------------------------- %%
bi 						= 0.50000								% [-] Bed interaction factor
method_transport 		= bagnold								% [-] Name of method to compute equilibrium sediment transport rate
method_grainspeed       = windspeed                           	% [-] Name of method to assume/compute grainspeed
Aa                      = 0.1               					% [-] Constant in formulation for wind velocity threshold based on grain size
Cb                     	= 1.7                					% [-] Constant in bagnold formulation for equilibrium sediment concentration
Ck                      = 2.78              					% [-] Constant in kawamura formulation for equilibrium sediment concentration
Cl                     	= 6.7               					% [-] Constant in lettau formulation for equilibrium sediment concentration
Cdk                     = 5.                 					% [-] Constant in DK formulation for equilibrium sediment concentration

%% -------------------- [Solver] ----------------------------- %%
T 						= 1     								% [s] Adaptation time scale in advection equation
solver 					= steadystate								% [-] Numerical solver of advection scheme
CFL                     = 1.                 					% [-] CFL number to determine time step in explicit scheme
accfac 					= 1.									% [-] Numerical acceleration factor
scheme 					= euler_backward 						% [-] Name of numerical scheme (euler_forward, euler_backward or crank_nicolson)
max_error               = 0.000001               				% [-] Maximum error at which to quit iterative solution in implicit numerical schemes
%max_error               = 100               				% [-] Maximum error at which to quit iterative solution in implicit numerical schemes
max_iter                = 1000               					% [-] Maximum number of iterations at which to quit iterative solution in implicit numerical schemes
max_bedlevel_change 	= 999.									% [m] Maximum bedlevel change after one timestep. Next timestep dt will be modified (use 999. if not used)

%% -------------------- [Boundary conditions] ---------------- %%
boundary_onshore 		= constant								% [-] Name of onshore boundary conditions (flux, constant, uniform, gradient)
boundary_lateral 		= constant	   							% [-] Name of lateral boundary conditions (circular, constant ==noflux)
boundary_offshore 		= constant									% [-] Name of offshore boundary conditions (flux, constant, uniform, gradient)
offshore_flux           = 0.                 					% [-] Factor to determine offshore boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
constant_offshore_flux  = 0.                 					% [kg/m/s] Constant input flux at offshore boundary
onshore_flux            = 0.                 					% [-] Factor to determine onshore boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
constant_onshore_flux   = 0.                 					% [kg/m/s] Constant input flux at offshore boundary
lateral_flux            = 0.                 					% [-] Factor to determine lateral boundary flux as a function of Q0 (= 1 for saturated flux , = 0 for noflux)
sedimentinput           = 0.                 					% [-] Constant boundary sediment influx (only used in solve_pieter)

%% -------------------- [Rotating shear-grid] ---------------- %%
dx 						= 1.0									% [m] Size of dimension of the computational grid that is generated for a rotating shear computation in x-direction
dy 						= 1.0       							% [m] Size of dimension of the computational grid that is generated for a rotating shear computation in x-direction
buffer_width			= 20.0									% [m] Width of the bufferzone around the rotational grid for wind perturbation	

%% -------------------- [Vegetation] ------------------------- %%	
sigma                   = 4.2                					% [-] Ratio between basal area and frontal area of roughness elements
beta 					= 130.000000							% [-] Ratio between drag coefficient of roughness elements and bare surface
gamma_vegshear          = 16.                					% [-] Roughness factor for the shear stress reduction by vegetation
avg_time              	= 86400.             					% [s] Indication of the time period over which the bed level change is averaged for vegetation growth
dzb_interval            = 86400.              					% [s] Interval used for calcuation of vegetation growth
hveg_max                = 1.                 					% [m] Max height of vegetation
dzb_opt                 = 0.                					% [m/year] Sediment burial for optimal growth
V_ver                   = 5.                 					% [m/year] Vertical growth
V_lat                   = 0.                 					% [m/year] Lateral growth
germinate               = 1.                 					% [1/year] Possibility of germination per year
lateral                 = 0.                 					% [1/year] Posibility of lateral expension per year
veg_gamma               = 1.                					% [-] Constant on influence of sediment burial
veg_sigma               = 0.8                					% [-] Sigma in gaussian distrubtion of vegetation cover filter
vegshear_type           = raupach          						% [-] Choose the Raupach grid based solver (1D or 2D) or the Okin approach (1D only)
veg_min_elevation		= -10.									% [m] Choose the minimum elevation where vegetation can grow
okin_c1_veg             = 0.48               					% [-] x/h spatial reduction factor in Okin model for use with vegetation
okin_initialred_veg     = 0.32               					% [-] initial shear reduction factor in Okin model for use with vegetation

%% -------------------- [Fences] ----------------------------- %%
okin_c1_fence           = 0.48               					% [-] x/h spatial reduction factor in Okin model for use with sand fence module
okin_initialred_fence   = 0.32               					% [-] initial shear reduction factor in Okin model for use with sand fence module
	
%% -------------------- [Seperation] ------------------------- %%	
c_b 					= 0.2									% [-] Slope at the leeside of the separation bubble # c = 0.2 according to Durán 2010 (Sauermann 2001: c = 0.25 for 14 degrees)
mu_b 					= 20.									% [deg] Minimum required slope for the start of flow separation
sep_filter_iterations 	= 0										% [-] Number of filter iterations on the separation bubble (0 = no filtering)
zsep_y_filter			= F										% [T/F] Boolean for turning on/off the filtering of the separation bubble height in y-direction

%% -------------------- [Soil moisture] ---------------------- %%		   
Tdry 					= 7200.000								% [s] Adaptation time scale for soil drying
eps                     = 0.001               					% [m] Minimum water depth to consider a cell "flooded"
method_moist            = belly_johnson    						% [-] Name of method to compute wind velocity threshold based on soil moisture content

%% -------------------- [Salt] ------------------------------- %%	
Tsalt                   = 2592000.000      						% [s] Adaptation time scale for salinitation
csalt                   = 0.0035              					% [-] Maximum salt concentration in bed surface layer

%% -------------------- [Waves] ------------------------------ %%
Tbedreset               = 86400.                				% [s] Adaptation time for resetting morphology in the Swash-zone
xi                      = .3                 					% [-] Surf similarity parameter
facDOD                  = .1                 					% [-] Ratio between depth of disturbance and local wave height    

%% -------------------- [Avalanching] ------------------------ %%
theta_dyn               = 33.                					% [degrees] Initial Dynamic angle of repose, critical dynamic slope for avalanching
theta_stat              = 34.                					% [degrees] Initial Static angle of repose, critical static slope for avalanching
max_iter_ava            = 1000               					% [-] Maximum number of iterations at which to quit iterative solution in avalanching calculation
%% -------------------- [Callback] --------------------------- %%
%callback                = callback.py:supply